/* eslint-disable no-redeclare */
// To parse this data:
//
//   import { Convert, CHSinput } from "./file";
//
//   const cHSinput = Convert.toCHSinput(json);

export interface CHSP0001 {
    cainfo:          string;
    fixmedins_code:  string;
    fixmedins_name:  string;
    inf_time:        string;
    infno:           string;
    infver:          string;
    input:           Input;
    insuplc_admdvs:  string;
    mdtrtarea_admvs: string;
    msgid:           string;
    oinfno:          string;
    opter:           string;
    opter_name:      string;
    opter_type:      string;
    pay_loc:         string;
    recer_admvs:     string;
    recer_sys_code:  string;
    sender_admdvs:   string;
    sign_no:         string;
    TOKEN:           string;
}

export interface Input {
    data: Data;
}

export interface Data {
    mdtrtId:      string;
    medinsSetlId: string;
    psn_no:       string;
    setlId:       string;
}

// Converts JSON strings to/from your types
export class CHSP0001 {
    public static toCHSP0001(json: Object): CHSP0001 {
        const temp = JSON.stringify(json)
        return JSON.parse(temp);
    }

    public static cHSP0001ToJson(value: CHSP0001): string {
        return JSON.stringify(value);
    }

    //初始化结算单的请求参数
    public static init(): CHSP0001 {
        let a = `
        {
            "TOKEN": "",
            "cainfo": "",
            "fixmedins_code": "P45010301036",
            "fixmedins_name": "钦州市第一人民医院",
            "inf_time": "2021-08-30 00:35:39",
            "infno": "P0001",
            "infver": "V1.0",
            "input": {
                "data": {
                    "setlId": "450100G0000145331973",
                    "mdtrtId": "450100G0000189618963",
                    "psn_no": "45000000000000000821660053",
                    "medinsSetlId": "P45010301036202209280809555607"
                }
            },
            "oinfno": "",
            "sign_no": "459900G0000024344716",
            "msgid": "100000202108172135160000726601",
            "opter": "4501030103612",
            "opter_name": "系统管理员",
            "pay_loc": "1",
            "recer_admvs": "450199",
            "sender_admdvs": "450199",
            "insuplc_admdvs": "450199",
            "mdtrtarea_admvs": "450199",
            "recer_sys_code": "1",
            "opter_type": "1"
        }
        `
        return this.toCHSP0001(JSON.parse(a))
        
    }
}